
package org.wlgzs.office_exam_student.servlet;

import java.io.IOException;
import java.io.StringWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Copyright (C), 2016-2018, 孤城落寞的博客 FileName: LoginServlet Author: gclm Date:
 * 2018/1/25 上午10:30 Description: LoginServlet 发送登录请求
 */
@WebServlet("/login.html")
public class LoginServlet extends BaseServlet {

	private static final long serialVersionUID = 1L;
	private static String CACHE = null;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		req.setAttribute("vcodeUri", "/login-vcode");
		if(CACHE == null){
			StringWriter sw = new StringWriter();
			render("login",sw);
			CACHE = sw.toString();
		}
		renderString(CACHE);

	}
}
